<template>
	<view class="box">
		<u-navbar title="挖宝活动" :fixed="true" :placeholder="true" :safeAreaInsetTop="true"  :autoBack="false" leftIconColor="#fff" titleStyle="color:#fff" bgColor="#211E38"
			rightText="活动记录" @leftClick="leftClick" @rightClick="right"></u-navbar>
		<view class="wrap" @click="godetail">
			<image src="../../static/image/wabao.png" mode=""></image>
			<view class="name">
				名字
			</view>
			<view class="tag">
				<text style="font-size: 100rpx;margin-right: 20rpx;" >·</text> 进行中	
			</view>
		</view>
	</view>

</template>

<script>

	export default {
		data() {
			return {
				
			}
		},
		onLoad() {
		
		},
		methods: {
			leftClick() {
				//获取页面栈的长度
				const canNavBack = getCurrentPages()
				console.log(canNavBack.length);
				// 判断是否刷新了浏览器，刷新了浏览器，页面栈只有当前一个
				if ( canNavBack.length > 1) {
					uni.navigateBack({
						delta: 1
					})
				} else {
					uni.switchTab({
						url:'/pages/index/index'
					})
				}
			},
			right(){
				uni.navigateTo({
					url:"/pagesMy/mallCenter/digBaby"
				})
			},
			godetail(){
				uni.navigateTo({
					url:"/pagesMy/activity/activitydetail"
				})
			}
		}
	}
</script>
<style>
	page {
		background: #211E38;
	}
</style>

<style lang="scss" scoped>
	
	@font-face {
		font-family: 'iconfont';
		src: url("~@/iconfont/almm.ttf");
	}

	.box {
		width: 750rpx;
		height: 1624rpx;
		// background-color: #211E38;
		position: relative;
	}
	/deep/ .u-navbar__content__right__text {
		color: #FFFFFF;
	}
	.wrap{
		width: 668rpx;
		height: 400rpx;
		background: #3C2F65;
		border-radius: 18rpx 18rpx 18rpx 18rpx;
		margin: 0 auto;
		margin-top: 44rpx;
		position: relative;
		>image{
			width: 668rpx;
			height: 306rpx;
		}
		.name{
			margin-top: 20rpx;
			margin-left: 20rpx;
			font-weight: 400;
			font-size: 32rpx;
			color: #FFFFFF;
		}
		.tag{
			display: flex;
			align-items: center;
			font-weight: 400;
			font-size: 32rpx;
			color: #FFFFFF;
			position: absolute;
			top: -40rpx;
			left: 40rpx;
		}
	}
</style>